package cate.game.role.res.kingsacrifice.msg;

import cate.common.annotation.OperationSetter;
import cate.common.table.d.GDOperation;
import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdBKingSacrifice;
import easy.java.dev.note.NoteField;
import easy.java.practice.errorcode.EcResult;

@ClientMsg(title = "刷新单个职业商品 の 请求")
@OperationSetter(GDOperation.KING_SACRIFICE)
public class KingSacrificeRefreshReq implements MsgInput {

    @NoteField(value = "职业",detail = "")
    public byte job;

    @Override
    public void execute(GameBody game, ClientContext cc) {
        EcResult<Void> r = cc.getRole().getRes().kingSacrifice.refresh(job);
        game.notice.message(cc.getRole(), r, true);
    }

    @Override
    public MsgConfig conf() {
        return MsgIdBKingSacrifice.REFRESH_REQ;
    }
}
